package com.woniuxy.trade.mapper;

import com.woniuxy.trade.entity.RoomUser;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface RoomUserMapper extends Mapper<RoomUser> {
    @Select("select * from room_user where roomId = #{id}")
    List<RoomUser> selectByRoomId(Integer id);

    @Select("select * from room_user where userId = #{buyuserid} and roomId = #{roomid}")
    RoomUser selectByUserIdAndRoomId(@Param("buyuserid") Integer buyuserid, @Param("roomid") Integer roomid);
}